{extend name="public/base" /}
{block name='body'}
<form action="{:url('base/upload')}" enctype="multipart/form-data" method="post">
    <input type="file" name="file" /> <br>
    <input type="submit" value="上传" />
</form>
<div class="layui-upload-drag" id="test10">
    <i class="layui-icon"></i>
    <p>点击上传，或将文件拖拽到此处</p>
</div>
{/block}
{block name='script'}
<script>
    //拖拽上传
    layui.use('upload',function () {
        var upload=layui.upload;
        upload.render({
            elem: '#test10'
            ,url: "{:url('base/upload')}"
            ,done: function(res){
                console.log(res)
            }
        });
    })

</script>
{/block}}